-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: DPE-5656 log rotation new options #597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial code revision, requested by Paulo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The log-syncing script once a COS relation is formed that waits to ensure that logs are being synced before changing the logrotation config -> the whole mechanism seems clunky. However, it seems like a sure fire way of ensuring that logs are syncing before the logrotation config is changed
Another option would be to check grep mysql.*log ${POSTIONS_FILE}
in the constructor of the charm (along with a no-op if the action is already taken) -> this will be unexpected-error proof with a retry mechanism built in (when the next update-status runs). Thoughts?
Co-authored-by: Sinclert Pérez <[email protected]>
…/mysql-operator into feature/dpe-5656-optional_logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thanks for addressing all my comments!
On point. I've refactored to remove the need of the custom event, and rely on update_status instead, since this can be somewhat lazy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though I left a possible minor improvement suggestion
|
||
self.charm = charm | ||
|
||
self.framework.observe(self.charm.on.update_status, self._update_logs_rotation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor suggestion: we can just call self._update_logs_rotation()
here to have it run for any event that comes in (not just update-status). However, upon update-status is good too!
Issue
DA124 implementation
Solution
Adds:
Fixes #539